<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head th:replace="layout :: head(~{ :: title}, ~{ :: link}, ~{ ::script},~{::style})">
    <meta charset="utf-8"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
    <title>商户管理平台-功能管理</title>

    <style></style>
    <link rel="stylesheet" th:href="@{/plugins/zTree_v3-master/css/zTreeStyle/zTreeStyle.css}">
    <script th:src="@{/plugins/jquery-confirm/jquery-confirm.min.js}"></script>
    <script th:src="@{/plugins/zTree_v3-master/js/jquery.ztree.core.js}"></script>
    <script th:src="@{/plugins/zTree_v3-master/js/jquery.ztree.excheck.js}"></script>
    <script type="text/javascript" th:inline="javascript">
        /*<![CDATA[*/
        var AllFuns =/*[[${session.AllFuns}]]*/;
        /*]]>*/
        var setting = {
            view: {
                dblClickExpand: false,
                showLine: true,
                selectedMulti: false
            },
            data: {
                simpleData: {
                    enable: true,
                    idKey: "id",
                    pIdKey: "pId",
                    rootPId: ""
                }
            },
            callback: {
                beforeClick: function (treeId, treeNode) {
                    var zTree = $.fn.zTree.getZTreeObj("tree");
                    if (treeNode.isParent) {
                        zTree.expandNode(treeNode);
                        return false;
                    } else {
                        window.location.href = "/MpsOpts/MpsOptsListFindByFunId?funId=" + treeNode.id;
                        return true;
                    }
                }
            }
        };
        var zNodes = JSON.parse(AllFuns);
        $(document).ready(function () {
            var t = $("#tree");
            t = $.fn.zTree.init(t, setting, zNodes);
        });
    </script>
    <style type="text/css">
        .listTable {
            position: absolute;
            left: 250px;
            padding-top: 0px;
            width: 180px;
            z-index: 810;
        }
        .mesContent {
            padding-left: 200px;
        }
    </style>
</head>
<body th:replace="layout::body(~{this::section})">
<section class="content-wrapper">
    <section class="content-header">
        <h2>
            操作
            <small>管理</small>
        </h2>
        <ol class="breadcrumb">
            <li><a href="/"><i class="fa fa-dashboard"></i> 商户管理平台</a></li>
            <li class="active">操作管理</li>
        </ol>
    </section>
    <section class="content">
        <div th:if="${respMsg != ''}" class="alert alert-danger alert-dismissible">
            <button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
            <h4><i class="icon fa fa-ban"></i> 操作提示</h4>
            <label th:text="${respMsg}"/>
        </div>
        <div class="row">
            <aside class="listTable">
                <TABLE border=0 align=left>
                    <TR>
                        <TD width=160px align=left valign=top style="BORDER-RIGHT: #999999 1px ">
                            <ul id="tree" class="ztree" style="width:160px; overflow:auto;"></ul>
                        </TD>
                    </TR>
                </TABLE>
            </aside>
            <section class="content-wrapper" th:replace="${pageSig} :: copyright"></section>
        </div>
    </section>
</section>
</body>
</html>